/*    */ package com.zimbra.cs.service.mail;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.cs.account.Account;
/*    */ import com.zimbra.cs.mailbox.CalendarItem;
/*    */ import com.zimbra.cs.mailbox.Mailbox;
/*    */ import com.zimbra.cs.mailbox.MailboxLock;
/*    */ import com.zimbra.cs.mailbox.OperationContext;
/*    */ import com.zimbra.cs.service.util.ItemId;
/*    */ import com.zimbra.soap.ZimbraSoapContext;
/*    */ import java.util.Map;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class AnnounceOrganizerChange
/*    */   extends CalendarRequest
/*    */ {
/* 34 */   private static final String[] TARGET_PATH = { "id" };
/*    */   
/*    */   protected String[] getProxiedIdPath(Element request)
/*    */   {
/* 38 */     return TARGET_PATH;
/*    */   }
/*    */   
/*    */   protected boolean checkMountpointProxy(Element request)
/*    */   {
/* 43 */     return false;
/*    */   }
/*    */   
/*    */   public Element handle(Element request, Map<String, Object> context) throws ServiceException
/*    */   {
/* 48 */     ZimbraSoapContext zsc = getZimbraSoapContext(context);
/* 49 */     Account acct = getRequestedAccount(zsc);
/* 50 */     Mailbox mbox = getRequestedMailbox(zsc);
/* 51 */     OperationContext octxt = getOperationContext(zsc, context);
/* 52 */     ItemId iid = new ItemId(request.getAttribute("id"), zsc);
/*    */     
/* 54 */     CalendarRequest.MailSendQueue sendQueue = new CalendarRequest.MailSendQueue();
/* 55 */     Element response = getResponseElement(zsc);
/* 56 */     mbox.lock.lock();
/*    */     try {
/* 58 */       CalendarItem calItem = mbox.getCalendarItemById(octxt, iid.getId());
/* 59 */       sendOrganizerChangeMessage(zsc, octxt, calItem, acct, mbox, sendQueue);
/*    */     } finally {
/* 61 */       mbox.lock.release();
/* 62 */       sendQueue.send();
/*    */     }
/* 64 */     return response;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/mail/AnnounceOrganizerChange.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */